<template>
  <div class="divider">
    <div v-if="message" class="message" v-bind="$attrs">{{ message }}</div>
    <div class="link"></div>
  </div>
</template>

<script>
export default {
  name: 'divider',
  props: {
    message: {
      type: String,
      default: ''
    }
  },
  data() {
    return {}
  }
}
</script>

<style lang="less" scoped>
.divider {
  position: relative;
  height: 40px;
  line-height: 40px;
  color: #777;
  font-size: 14px;
  margin: 12px 0;
  .message {
    position: relative;
    display: inline-block;
    height: 40px;
    padding: 0 20px;
    background: #fff;
    z-index: 2;
    margin-left: 20px;
  }
  .link {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e4e7;
    z-index: 1;
  }
}
</style>
